package com.pactera.madp.daemon.quartz.task;

import com.pactera.madp.common.core.constant.SecurityConstants;
import com.pactera.madp.cp.api.feign.RemoteWorkEmployeeSynService;
import com.pactera.madp.daemon.quartz.constant.enums.MadpQuartzEnum;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * WorkEmployeeSynTask
 *
 * @author jun
 * @version 1.0
 * 2021/8/20 11:18
 **/
@Slf4j
@Component("workEmployeeSynTask")
@AllArgsConstructor
public class WorkEmployeeSynTask {

    private final RemoteWorkEmployeeSynService workEmployeeSynService;

    @SneakyThrows
    public String onAsyncEmpStatistic(){
        workEmployeeSynService.onAsyncEmpStatistic(SecurityConstants.FROM_IN);
        return MadpQuartzEnum.JOB_LOG_STATUS_SUCCESS.getType();
    }

}
